package me.ZFC.Text;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String s = sc.next();
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (c >= 'a' && c <= 'z') {
                count1++;
            } else if (c >= 'A' && c <= 'Z') {
                count2++;
            } else if (c >= '0' && c <= '9') {
                count3++;
            }
        }
        System.out.println("小写字母有" + count1 + "个");
        System.out.println("大写字母有" + count2 + "个");
        System.out.println("数字有" + count3 + "个");
    }
}
